//
//  InputData.h
//  HelloCpp
//
//  Created by Nguyen Cong Huy on 10/7/14.
//
//

#ifndef __HelloCpp__InputData__
#define __HelloCpp__InputData__

#include "Header.h"
#include <string>
using namespace std;

class InputData {
    void addVehicleDataFromString(string line);
    VehicleData* createVehicleDataFromLine(string line);
    int getTimeValue(string timeString);
    CCArray* vehicleDataArray;
    int minStartTime;
    int maxStartTime;
    
public:
    
    
    InputData();
    void clearData();
    void addVehicleData(VehicleData* data);
    void removeVehicleData(VehicleData* data);
    bool readAppendDataFromFile(const char* fileName);
    void sortByTime();
    CCString* description();
    void print();
    CCArray* getObjectsAndRemove(int time);
    ~InputData();
    
    // get set
    int getMinStartTime();
    int getMaxStartTime();
    CCArray* getVehicleDataArray();
    CCArray* getVehicleDataArrayAtTime(int time);
};

#endif /* defined(__HelloCpp__InputData__) */
